﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Core
{
    class NQ
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public string age { get; set; }
    }

    public class test
    {
        private static void Test(object obj)
        {
            Console.WriteLine(obj);
            if (obj is NQ)
            {
                ((NQ)obj).ID = 110;
            }
            obj = "1";
            Console.WriteLine(obj);
        }

        private static void Main(string[] args)
        {
            object obj = DateTime.Now;
            Test(obj);
            obj = new NQ();
            Test(obj);
            Console.WriteLine(((NQ)obj).ID);

            obj = new string[] { "1" };
            Test(obj);
            Console.WriteLine(obj);
        }
    }
}
